import collections
from typing import List, Set

a = range(10, 100, 3)
print([(x, y) for x in a for y in range(1, 10) if x != y])

from collections import deque

dq = deque(['a', 'b', 'c'])
dq.append('d')
dq.append('e')
dq.append('f')
print(dq)
dq.popleft()
print(dq)


def deq(nums: List[int]):
    dd = deque(nums)

    def dqf():
        return dd

    return dqf


dd = deq([1, 2, 3])
dd().append(4)
dd().append(5)
print(dd())
print(dd().popleft())
print(dd())


def allp(nums: List[int]) -> list[tuple[int, int]]:
    ln = len(nums)
    return [(x, z) for z in range(ln) for x in nums]


print(allp([1, 2, 3, 4]))

st = set()
st.add(1)
st.add(2)
st.add(2)
st.add(4)
print(st)

print(st.pop())
print(st)

